package com.woniuxy.riskmanage.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
@RequestMapping("/rules")
public class RiskmanageController {

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/test")
    public String test() {
        //调用  provider/provider   微服务/集群名字
        String url = "http://nacos-provider/provider/test";
        String port = restTemplate.getForObject(url, String.class);

        return port;
    }
}
